home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 108 / MacAddict108.iso / Software / Internet & Communication / WordPress 1.5.1.dmg / wordpress / wp-admin / upgrade.php < prev    next >
Encoding:
PHP Script  |  2005-03-18  |  2.1 KB  |  96 lines

  1. <?php
  2. define('WP_INSTALLING', true);
  3. if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config-sample.php with the proper database connection information and renamed it to wp-config.php.");
  4. require('../wp-config.php');
  5. timer_start();
  6. require_once(ABSPATH . '/wp-admin/upgrade-functions.php');
  7.  
  8. $step = $_GET['step'];
  9. if (!$step) $step = 0;
  10. ?>
  11. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  12. <html xmlns="http://www.w3.org/1999/xhtml">
  13. <head>
  14.     <title>WordPress › Upgrade</title>
  15.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  16.     <style media="screen" type="text/css">
  17.     <!--
  18.     html {
  19.         background: #eee;
  20.     }
  21.     body {
  22.         background: #fff;
  23.         color: #000;
  24.         font-family: Georgia, "Times New Roman", Times, serif;
  25.         margin-left: 20%;
  26.         margin-right: 20%;
  27.         padding: .2em 2em;
  28.     }
  29.     
  30.     h1 {
  31.         color: #006;
  32.         font-size: 18px;
  33.         font-weight: lighter;
  34.     }
  35.     
  36.     h2 {
  37.         font-size: 16px;
  38.     }
  39.     
  40.     p, li, dt {
  41.         line-height: 140%;
  42.         padding-bottom: 2px;
  43.     }
  44.  
  45.     ul, ol {
  46.         padding: 5px 5px 5px 20px;
  47.     }
  48.     #logo {
  49.         margin-bottom: 2em;
  50.     }
  51. .step a, .step input {
  52.     font-size: 2em;
  53. }
  54. .step, th {
  55.     text-align: right;
  56. }
  57. #footer {
  58. text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: italic;
  59. }
  60.     -->
  61.     </style>
  62. </head>
  63. <body>
  64. <h1 id="logo"><img alt="WordPress" src="http://static.wordpress.org/logo.png" /></h1>
  65. <?php
  66. switch($step) {
  67.  
  68.     case 0:
  69. ?> 
  70. <p><?php _e('This file upgrades you from any previous version of WordPress to the latest. It may take a while though, so be patient.'); ?></p> 
  71.     <h2 class="step"><a href="upgrade.php?step=1"><?php _e('Upgrade WordPress »'); ?></a></h2>
  72. <?php
  73.     break;
  74.     
  75.     case 1:
  76.     make_db_current_silent();
  77.     upgrade_all();
  78. ?> 
  79. <h2><?php _e('Step 1'); ?></h2> 
  80.     <p><?php printf(__("There's actually only one step. So if you see this, you're done. <a href='%s'>Have fun</a>!"), '../'); ?></p>
  81.  
  82. <!--
  83. <pre>
  84. <?php printf(__('%s queries'), $wpdb->num_queries); ?>
  85.  
  86. <?php printf(__('%s seconds'), timer_stop(0)); ?>
  87. </pre>
  88. -->
  89.  
  90. <?php
  91.     break;
  92. }
  93. ?> 
  94. </body>
  95. </html>
  96.